|
mdbt42q 2.2.0
|
API for configuring and manipulating MDBT42Q Click driver. More...
Topics | |
| MDBT42Q Device Settings | |
| Settings for registers of MDBT42Q Click driver. | |
| MDBT42Q MikroBUS Map | |
| MikroBUS pin mapping of MDBT42Q Click driver. | |
Functions | |
| void | mdbt42q_cfg_setup (mdbt42q_cfg_t *cfg) |
| MDBT42Q configuration object setup function. | |
| err_t | mdbt42q_init (mdbt42q_t *ctx, mdbt42q_cfg_t *cfg) |
| MDBT42Q initialization function. | |
| err_t | mdbt42q_generic_write (mdbt42q_t *ctx, uint8_t *data_in, uint16_t len) |
| MDBT42Q data writing function. | |
| err_t | mdbt42q_generic_read (mdbt42q_t *ctx, uint8_t *data_out, uint16_t len) |
| MDBT42Q data reading function. | |
| void | mdbt42q_set_rst_pin (mdbt42q_t *ctx, uint8_t state) |
| MDBT42Q set RST pin function. | |
| void | mdbt42q_set_pd_pin (mdbt42q_t *ctx, uint8_t state) |
| MDBT42Q set PD pin function. | |
| void | mdbt42q_set_cts_pin (mdbt42q_t *ctx, uint8_t state) |
| MDBT42Q set CTS pin function. | |
| uint8_t | mdbt42q_get_rts_pin (mdbt42q_t *ctx) |
| MDBT42Q get RTS pin function. | |
| uint8_t | mdbt42q_get_ind_pin (mdbt42q_t *ctx) |
| MDBT42Q get IND pin function. | |
| void | mdbt42q_reset_device (mdbt42q_t *ctx) |
| MDBT42Q reset device function. | |
| void | mdbt42q_cmd_run (mdbt42q_t *ctx, uint8_t *cmd) |
| MDBT42Q cmd run function. | |
| void | mdbt42q_cmd_set (mdbt42q_t *ctx, uint8_t *cmd, uint8_t *value) |
| MDBT42Q cmd set function. | |
API for configuring and manipulating MDBT42Q Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void mdbt42q_cfg_setup | ( | mdbt42q_cfg_t * | cfg | ) |
MDBT42Q configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See mdbt42q_cfg_t object definition for detailed explanation. |
| void mdbt42q_cmd_run | ( | mdbt42q_t * | ctx, |
| uint8_t * | cmd ) |
MDBT42Q cmd run function.
This function sends a specified command to the Click module.
| [in] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see MDBT42Q_CMD_x definitions. |
| void mdbt42q_cmd_set | ( | mdbt42q_t * | ctx, |
| uint8_t * | cmd, | ||
| uint8_t * | value ) |
MDBT42Q cmd set function.
This function sets a value to a specified command of the Click module.
| [in] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see MDBT42Q_CMD_SET_PARAM_x definitions. |
| [in] | value | : Value string. |
| err_t mdbt42q_generic_read | ( | mdbt42q_t * | ctx, |
| uint8_t * | data_out, | ||
| uint16_t | len ) |
MDBT42Q data reading function.
This function reads a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
>0 - Number of data bytes read, <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation. | err_t mdbt42q_generic_write | ( | mdbt42q_t * | ctx, |
| uint8_t * | data_in, | ||
| uint16_t | len ) |
MDBT42Q data writing function.
This function writes a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| [in] | data_in | : Data buffer for sending. |
| [in] | len | : Number of bytes for sending. |
>=0 - Success, <0 - Error. See #err_t definition for detailed explanation. | uint8_t mdbt42q_get_ind_pin | ( | mdbt42q_t * | ctx | ) |
MDBT42Q get IND pin function.
This function returns the BT connection active indicator (IND) pin logic state.
| [in] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| uint8_t mdbt42q_get_rts_pin | ( | mdbt42q_t * | ctx | ) |
MDBT42Q get RTS pin function.
This function returns the ready to send pin logic state.
| [in] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| err_t mdbt42q_init | ( | mdbt42q_t * | ctx, |
| mdbt42q_cfg_t * | cfg ) |
MDBT42Q initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See mdbt42q_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void mdbt42q_reset_device | ( | mdbt42q_t * | ctx | ) |
MDBT42Q reset device function.
This function resets the device by toggling the reset pin logic state.
| [in] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| void mdbt42q_set_cts_pin | ( | mdbt42q_t * | ctx, |
| uint8_t | state ) |
MDBT42Q set CTS pin function.
This function sets the clear to send pin logic state.
| [in] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |
| void mdbt42q_set_pd_pin | ( | mdbt42q_t * | ctx, |
| uint8_t | state ) |
MDBT42Q set PD pin function.
This function sets the UART Power down pin logic state.
| [in] | ctx | : Click context object. See mdbt42q_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |